package cn.edu.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
public class HelloController2 {
    @Value("${server.port}")
    String port;
    @RequestMapping("port")
    public String getPort(){
        return "Hello World, I'm from port:"+port;
    }
    //feign的参数绑定
    @GetMapping(value = "/hello1")
    public String hello(@RequestParam String name){
        return "hello,"+name;
    }
//    @PostMapping(value = "/hello2")
//    public String hello(@RequestBody Users user){
//        return "hello,"+user.getName()+","+user.getAge();
//    }

}
